import common from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
//新建一个rollup.config.js
export default [
    {
        input: "./src/index.js",

        output: {
            file: "./dist/index.js",
            format: "es",
        }, // 输出文件
    },
    {
        input: "./src/index.js",
        output: {
            file: "./dist/index.browser.js",
            format: "es",
        }, // 输出文件
        plugins: [
            common(),
            resolve({
                browser: true,
            }),
            terser(),
        ],
    },
];
